package simple.engine.objects;

public class Vector3f {
	
	private float mX, mY, mZ;
	
	// Getters and setters
	
	public void setX(float value)
	{
		this.mX = value;
	}
	
	public void setY(float value)
	{
		this.mY = value;
	}
	
	public void setZ(float value)
	{
		this.mZ = value;
	}
	
	public float getX()
	{
		return mX;
	}
	
	public float getY()
	{
		return mY;
	}
	
	public float getZ()
	{
		return mZ;
	}
	
	// Constructors
	
	public Vector3f()
	{
		mX = mY = mZ = 0;
	}
	
	public Vector3f(float x, float y, float z)
	{
		this.mX = x;
		this.mY = y;
		this.mZ = z;
	}
	
	// Methods 
	
	public void setValue(float x, float y, float z)
	{
		this.mX = x;
		this.mY = y;
		this.mZ = z;
	}
	
	public void addVector(Vector3f vector3f)
	{
		this.mX += vector3f.mX;
		this.mY += vector3f.mY;
		this.mZ += vector3f.mZ;
	}
	
	public void scalarMultiplication(float scalar)
	{
		this.mX *= scalar;
		this.mY *= scalar;
		this.mZ *= scalar;
	}
	
	// Overrides
	
	@Override
	public String toString() {
		return "(" + mX + ", " + mY +", " + mY + ")";
	}
		
	
}
